home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 008a / fgdemo10.zip / FGDEMO.DOC < prev    next >
Text File  |  1991-10-05  |  17KB  |  330 lines

  1.  
  2.                              FGDEMO version 1.0
  3.  
  4.        -----------------------------------------------------------
  5.        FGDEMO:  the demo program for Fastgraph and Fastgraph/Light
  6.        -----------------------------------------------------------
  7.  
  8. This program illustrates some of the features of the Fastgraph (tm)
  9. graphics library.  It was written by Diana Gruber, senior programmer at
  10. Ted Gruber Software.  You can contact Ted Gruber Software at the address
  11. and phone numbers listed at the bottom of this file.
  12.  
  13. FGDEMO is distributed with source code.  It was originally compiled with
  14. the Microsoft C 5.1 medium memory model.  You may use the source code in
  15. FGDEMO in your own applications.  This program requires either Fastgraph
  16. or Fastgraph/Light (tm) to link.  If you want to use this code, and you
  17. don't have a copy of Fastgraph, please contact Ted Gruber Software.
  18.  
  19.                              ---------------
  20.                              Starting FGDEMO
  21.                              ---------------
  22.  
  23. You can install FGDEMO on a hard disk or run it from diskette.  Just type
  24. FGDEMO at the DOS command prompt.  To install FGDEMO on a hard disk,
  25. create a subdirectory and copy all the files from the diskette to the
  26. subdirectory.
  27.  
  28.                                -----------
  29.                                Video modes
  30.                                -----------
  31.  
  32. FGDEMO runs in a choice of 4 video modes:
  33.  
  34.    640x200 2-color CGA
  35.    640x200 16-color EGA
  36.    640x350 16-color EGA
  37.    720x348 Hercules monochrome
  38.  
  39. When you start the program, you will be given a default video mode choice,
  40. and an opportunity to change to one of the other video modes.  We suggest
  41. you try all of them, and see what they look like.  Note that some of
  42. these video modes may not be available on your system.
  43.  
  44.                               --------------
  45.                               Running FGDEMO
  46.                               --------------
  47.  
  48. After you start FGDEMO and choose a video mode, an attractive horizontal
  49. menu bar will appear at the top of the screen.  Press any key or click
  50. the left mouse button to get the first pull-down vertical menu.  Select a
  51. feature from this or any menu.  The menus are intuitive.  Select and try
  52. all the features on all the menus.
  53.  
  54.                            -------------------
  55.                            Distributing FGDEMO
  56.                            -------------------
  57.  
  58. You may freely distribute FGDEMO as long as all the files are distributed
  59. together in their original unaltered state.  If you want to zip the files
  60. together for BBS distribution, please use the file name FGDEMO10.ZIP for 
  61. version 1.0 of FGDEMO.  The following files are included in the FGDEMO
  62. distribution:
  63.  
  64.     Files required to run FGDEMO
  65.     ----------------------------
  66.     FGDEMO   EXE  - the program
  67.     08PT     FNT  - font files (packed pixel run format)
  68.     14PT     FNT
  69.     CASINO   PPR  - graphic file (packed pixel run format)
  70.     ORDER    FRM  - order form (can be printed from File menu)
  71.  
  72.     Documentation
  73.     -------------
  74.     FGDEMO   DOC  - this file
  75.  
  76.     Source code for FGDEMO
  77.     ----------------------
  78.     CHAR     C   - character display and management functions
  79.     COMMON   C   - initialization, termination, general i/o functions
  80.     DISPLAY  C   - functions on Display submenu
  81.     EDITOR   C   - text editor functions
  82.     FGDEMO   C   - function main and screen drawing functions
  83.     FILE     C   - functions on File submenu
  84.     FUNDMTLS C   - functions on Fundamentals submenu
  85.     MENU     C   - define and manage the horizontal and vertical menus
  86.     MISC     C   - functions on Miscellaneous submenu
  87.     UTILITY  C   - functions on Utilities submenu
  88.     VIDEO    C   - functions on Video submenu
  89.  
  90.     Header files
  91.     ------------
  92.     DEFS     H   - general declarations and initializations
  93.     BITMAPS  H   - TNT and "Kablooy" bitmaps for explosion
  94.     CHAR     H   - these files contain the function declarations.
  95.     COMMON   H     Each one is associated with a source code file.
  96.     DISPLAY  H     The Microsoft C compiler creates these files
  97.     EDITOR   H     when the /Zg switch is used.
  98.     FGDEMO   H
  99.     FILE     H
  100.     FUNDMTLS H
  101.     MENU     H
  102.     MISC     H
  103.     UTILITY  H
  104.     VIDEO    H
  105.  
  106.     Make files
  107.     ----------
  108.     BUILD    BAT - batch file to compile and link FGDEMO with Turbo C
  109.     FGDEMO   PRJ - project make file for Turbo C
  110.     WORK         - make file for Microsoft C
  111.  
  112.                        ----------------------------
  113.                        Compiling and linking FGDEMO
  114.                        ----------------------------
  115.  
  116. The source code files may be recompiled using either Microsoft C or Turbo
  117. C.  The medium memory model is recommended, and the large model will also
  118. work.  FGDEMO is too big to use the small memory model.
  119.  
  120. If you are using Microsoft C, use the make file WORK to compile and link
  121. FGDEMO with the Fastgraph/Light medium model library.  If you want to
  122. link FGDEMO with Fastgraph instead of Fastgraph/Light, change the library
  123. name FGLM to FGM in the LINK command.
  124.  
  125. If you are using Turbo C, Turbo C++, or Borland C++, use the project make
  126. file FGDEMO.PRJ to compile and link FGDEMO.  Be sure you've configured
  127. the compiler to use the medium memory model.  Alternatively, you can use
  128. the command file BUILD.BAT to perform the compilation and linking.
  129. BUILD.BAT uses the TCC command; you may need to change it for Turbo C++
  130. or Borland C++.  If you want to link FGDEMO with Fastgraph instead of
  131. Fastgraph/Light, change the library name FGLM to FGM in the TLINK
  132. command, or in the last line of the project make file.
  133.  
  134. You may have trouble running FGDEMO in the 640x200x16 color mode in the
  135. Turbo C integrated development environment.  That is because the
  136. environment allocates all available memory, making it impossible for
  137. Fastgraph to allocate a virtual video page.  FGDEMO requires two video
  138. pages.  You should be able to run FGDEMO in the other video modes, and
  139. you should have no trouble compiling, linking, and running FGDEMO from
  140. the DOS command line.
  141.  
  142. We have had some reports of trouble with older versions of TLINK finding
  143. the Fastgraph or Fastgraph/Light libraries.  If you have this problem, be
  144. sure the full path name of the library appears in your TLINK.CFG file. If
  145. that does not solve the problem, include the full library path name in
  146. the TLINK command.  We called Borland technical support about this
  147. problem, and they told us there is no TLINK.CFG file supported in Turbo C
  148. version 2.0, but it is supported in Turbo C++ and Borland C++.
  149.  
  150.                           ----------------------
  151.                           About the FGDEMO menus
  152.                           ----------------------
  153.  
  154. The menu structure is defined in the file DEFS.H.  A typdef CMD is
  155. defined which is a structure containing information about each menu
  156. item:  the function called when the menu choice is activated, the 
  157. descriptive name of the menu item, the x and y location of the menu item,
  158. and pointers to the next and previous items on the menu.  Each menu is
  159. defined by an array of these structures, and is initialized at the top of
  160. MENU.C.  
  161.  
  162. There are two types of menus:  a horizontal menu, which is the moving bar
  163. menu at the top of the screen, and vertical menus, also known as 
  164. "pull-down" menus.  When a pull-down menu is visible, a menu function may
  165. be activated by either clicking the mouse on a highlighted menu function,
  166. or by pressing <Enter>.  Arrow keys are used to highlight the next and
  167. previous menu item, and a mouse may also be used.
  168.  
  169. User input relevant to the menus is accepted in two places:  within the
  170. vertical_menu function (to activate a menu choice), or in the main
  171. function (to control the horizontal menu).  The horizontal menu is also
  172. controlled within the vertical menu, to the extent that if an arrow key
  173. is pressed, the next or previous pull-down menu becomes active.
  174.  
  175. The entire screen, including the horizontal menu and the dithered
  176. background, is drawn at the beginning of the program and stored on the
  177. hidden page.  When a function is called, for example "point", part or all
  178. of the visual page is overwritten, in this case with a pattern of
  179. points.  When a key or mouse button is pressed, the relevant parts of the
  180. hidden page are copied back to the visual page using fg_transfer,
  181. resulting in quick (almost instantaneous) screen redraws.  Occasionally,
  182. the entire hidden page needs to be completely redrawn, such as after the
  183. graphics file is displayed, but in most cases only a small part of the
  184. hidden page needs to be redrawn, usually with a single call to fg_drect. 
  185. In general, the hidden page is assumed to have a "clean" copy of the
  186. horizontal menu screen throughout the program, and whenever it is 
  187. overwritten it is immediately restored.
  188.  
  189.                              ---------------
  190.                              About Fastgraph
  191.                              ---------------
  192.  
  193. Fastgraph is a professional graphics library of more than 150
  194. highly-optimized routines that are callable from high-level and assembly
  195. language programs running under the MS-DOS or PC-DOS operating systems. 
  196. This collection of routines provides a programmer with proven, powerful
  197. tools to take command of the PC and PS/2 text and graphics video
  198. environment. Fastgraph/Light's major features include:
  199.  
  200.    * Video mode detection and initialization
  201.    * Colors, virtual colors, and palettes
  202.    * Graphics fundamentals, including points, solid and dashed lines,
  203.      polygons, circles, ellipses, solid and dithered rectangles, region
  204.      fill, and clipping
  205.    * Character display
  206.    * Image display facilities, including mode-specific and mode-independent
  207.      images, clipped and reversed images, image retrieval, pixel run maps,
  208.      and image transfer
  209.    * Screen space, character space, and programmer-defined world space
  210.      coordinate systems
  211.    * Physical and virtual video page management
  212.    * Animation
  213.    * Special effects
  214.    * Keyboard, mouse, and joystick control
  215.    * Sound effects and music, both synchronous and asynchronous
  216.    * Supports Microsoft C, Turbo C/C++, Borland C++, QuickC, QuickBASIC,
  217.      and MS FORTRAN
  218.    * Supports small, medium, and large memory models
  219.    * Extensive tutorial-style user's guide and reference manual
  220.    * No royalties
  221.  
  222. As its name implies, the most notable feature of Fastgraph is its speed. 
  223. Fastgraph is written in 8086 assembly language, and each routine has been
  224. optimized by hand to provide maximum performance.
  225.  
  226. Fastgraph supports all standard text and graphics video modes used by the
  227. IBM PC (PC, PC/XT, and PC/AT) and PS/2 families and compatible systems.
  228. In addition, Fastgraph/Light provides support for a commonly used video
  229. mode for the Tandy 1000 series computers and the PCjr, two video modes
  230. for the Hercules Graphics Card, and two extended VGA modes.
  231.  
  232. Fastgraph is an ideal development tool for entertainment and educational
  233. software, presentation graphics products, scientific and engineering
  234. applications, CAD/CAM, animation, or any application that requires robust
  235. graphics.  Fastgraph has been used in retail products such as Accolade's
  236. Test Drive III, Day of the Viper, Steel Thunder, and Gunboat,
  237. ComputerEasy's Video Poker a la Carte, Compu-Teach's Once Upon a Time
  238. series, Destination: Mars, and Puppet Playhouse, and all our shareware
  239. products.
  240.  
  241.                       ------------------------------
  242.                       Fastgraph/Light evaluation kit
  243.                       ------------------------------
  244.  
  245. A free Fastgraph/Light evaluation kit is available from Ted Gruber
  246. Software.  The kit consists of a fully functional evaluation copy of
  247. Fastgraph/Light, on-line versions of the extensive Fastgraph User's Guide
  248. and Fastgraph Reference Manual (over 430 pages), and source code for all
  249. the example programs in the Fastgraph User's Guide.  You can download the
  250. evaluation kit from our technical support bulletin board by calling (702)
  251. 796-7134, or you can order it using the order form below.
  252.  
  253.                            --------------------
  254.                            Ordering information
  255.                            --------------------
  256.  
  257. Please use the order form below to order the Fastgraph/Light evaluation
  258. kit, order Fastgraph or Fastgraph/Light, or order Fastgraph manuals.  For
  259. your convenience, this form appears by itself in the ORDER.FRM file.
  260.  
  261. We accept Visa and MasterCard.  Purchase orders are welcome from most
  262. companies, schools, and government agencies.
  263.  
  264. Site licenses are available for Fastgraph/Light and Fastgraph.  Please
  265. call or write for specific details.
  266.  
  267. As an added incentive to register Fastgraph/Light or purchase Fastgraph,
  268. the first 100 orders will receive a truly awesome Fastgraph T-shirt,
  269. compliments of Ted Gruber Software!  This offer does not apply to orders
  270. for the evaluation kit, or orders for manuals only.
  271.  
  272. Order from:
  273. Ted Gruber Software                    Orders and information:  (702) 735-1980
  274. PO Box 13408                        Technical support (voice):  (702) 735-1980
  275. Las Vegas, NV  89112                  Technical support (BBS):  (702) 796-7134
  276.  
  277. Name:    _____________________________________________________________________
  278.  
  279. Address: _____________________________________________________________________
  280.  
  281. City:    _____________________________________  State: ________  Zip: ________
  282.  
  283. Phone:   _____________________________________
  284.  
  285. Please send the following products:
  286.  
  287. +======+==========================================+=======+==========+=======+
  288. |      |                                          | Price | Shipping |       |
  289. | Qty. |            Product Description           | Each  |   Each   | Total |
  290. +======+==========================================+=======+==========+=======+
  291. |      |                                          |       |          |       |
  292. |      | Fastgraph/Light evaluation kit           | free  |    $3    |       |
  293. |      |                                          |       |          |       |
  294. +------+------------------------------------------+-------+----------+-------+
  295. |      | Registered version of Fastgraph/Light    |       |          |       |
  296. |      | (includes on-line manuals but no         |  $49  |   free   |       |
  297. |      | printed manuals)                         |       |          |       |
  298. +------+------------------------------------------+-------+----------+-------+
  299. |      | Fastgraph professional graphics library  |       |          |       |
  300. |      | (includes Fastgraph User's Guide and     | $149  |   free   |       |
  301. |      | Fastgraph Reference Manual)              |       |          |       |
  302. +------+------------------------------------------+-------+----------+-------+
  303. |      | Fastgraph User's Guide and               |       |          |       |
  304. |      | Fastgraph Reference Manual               |  $25  |    $5    |       |
  305. |      | (for Fastgraph and Fastgraph/Light)      |       |          |       |
  306. +------+------------------------------------------+-------+----------+-------+
  307. |      | Upgrade registered version of            |       |          |       |
  308. |      | Fastgraph/Light to Fastgraph             | $100  |   free   |       |
  309. |      |                                          |       |          |       |
  310. +======+==========================================+=======+==========+=======+
  311.                                                            Subtotal  |       |
  312.                                                                      +=======+
  313.                                      Nevada residents add sales tax  |       |
  314.                                                                      +=======+
  315.                 Orders outside the U.S. and Canada add 15% shipping  |       |
  316.                                                                      +=======+
  317.                                                               Total  |       |
  318.                                                                      +=======+
  319. Specify disk format:            Method of payment:
  320.  
  321.      [ ] 3.5-inch                    [ ] payment enclosed
  322.      [ ] 5.25-inch                   [ ] purchase order # ____________________
  323.                                      [ ] Visa
  324.                                      [ ] MasterCard
  325. For credit card orders only:
  326.  
  327.      Card number: _______________________________  Expiration date: __________
  328.  
  329.      Signature:   ____________________________________________________________
  330.